var FFReadFeed = Class.create({
  
  initialize: function(feedID, option){
	this.url = PROXY + READ_FEED_URL;
	if(feedID!=null)
		this.url += feedID;
	
	if(option!=null){
		this.url += '?';	
	  
	  if(option.start!=null && !isNaN(option.start)){
		  this.url += '&start='+option.start;
	  }
	  
	  if(option.num!=null && !isNaN(option.num)){
		  this.url += '&num='+option.num;
	  }
	  
	  if(option.maxcomments!=null && !isNaN(option.maxcomments)){
		  this.url += '&maxcomments='+option.maxcomments;
	  }
	  
	  if(option.maxlikes!=null && !isNaN(option.maxlikes)){
		  this.url += '&maxlikes='+option.maxlikes;
	  }
	  
	  if(option.hidden!=null && option.hidden==1){
		  this.url += '&hidden='+option.hidden;
	  }
	  
	  if(option.fof!=null && option.fof==1){
		  this.url += '&fof='+option.fof;
	  }
	  
	  if(option.raw!=null && option.raw==1){
		  this.url += '&raw='+option.raw;
	  }
	  
	}
  },

  getURL: function(){
	return this.url;  
  },
  
  setURL: function(url){
	  this.url = url;
  },
  
  getStart: function(){
	  if(option!=null && option.start!=null){
		return option.start;
	  }
	  return null;
  },
  
  setStart: function(number){
	  option.start = number;
  },
  
  getNum: function(){
	  if(option!=null && option.num!=null){
		return option.num;  
	  }
	  return null;
  },
  
  setNum: function(number){
	  option.num = number;
  },
  
  getMaxComments: function(){
	  if(option!=null && option.maxcomments!=null){
		return option.maxcomments;
	  }
	  return null; 
  },
  
  setNum: function(number){
	  option.maxcomments = number;
  },	
  
  getMaxLikes: function(){
	  if(option!=null && option.maxlikes!=null){
		return option.maxlikes;
	  }
	  return null; 
  },
  
  setMaxLikes: function(number){
	  option.maxlikes = number;
  },
  
  isHidden: function(){
	  if(option!=null && option.hidden==1){
	    return true;
	  }
	  return null; 
  },
  
  setHidden: function(boolean){
	  if(boolean==true || boolean==false){
	    option.maxlikes = boolean;
	  }else{
		throw "FFReadFeed Error 1001: setHidden param must be true or false!";  
	  }  
  },
  
  isFof: function(){
	  if(option!=null && option.fof==1){
	    return true;
	  }
	  return null; 
  },
  
  setFof: function(boolean){
	  if(boolean==true || boolean==false){
	    option.fof = boolean;
	  }else{
		throw "FFReadFeed Error 1002: setFof param must be true or false!";  
	  }  
  },
  
  isRaw: function(){
	  if(option!=null && option.raw==1){
	    return true;
	  }
	  return null; 
  },
  
  setRaw: function(boolean){
	  if(boolean==true || boolean==false){
	    option.raw = boolean;
	  }else{
		throw "FFReadFeed Error 1003: setRaw param must be true or false!";  
	  }  
  }
}); //FFReadFeed END










